<?php

declare(strict_types=1);

namespace app\admin\model;

use think\Model;
use app\admin\model\RoleModel;
use think\model\concern\SoftDelete;

/**
 * @mixin \think\Model
 */
class AdminModel extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';

    protected $table = 'admin';

    // 一对一相对关联role表模型
    public function role()
    {
        return $this->belongsTo(RoleModel::class, 'role_id', 'id');
    }
}